Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryConfigure thumbnail image to initiate downloadConfigure thumbnail image to initiate download
Previous
 
Next
New Post
7/1/2012 1:39 PM
 

We use the Repository module to house issues of our club newsletter.  Each newsletter issue is a PDF file.  We generate a thumbnail image of the first page for the repository entry.

I have received many requests from our users to have the thumbnail image initiate the download of the newsletter instead of presenting the thumbnail image in a new page.  Can this be accomplished through the templates, or do I need to alter the code?

Thanks.

 
New Post
7/1/2012 2:49 PM
 

I tried adding the following the the template.xml file:

<Setting>
          <Name>DOWNLOAD</Name>
          <Value>true</Value>
</Setting>


It works for the [TITLE] token, but not the [THUMBNAIL] token.

 
New Post
7/2/2012 9:09 AM
 

The THUMBNAIL token is a quick shortcut to displaying a resized image, and you are correct it does not support the DOWNLOAD setting.

However, the IMAGE token does.  

Normally, the [IMAGE] token displays the image full size, however, if you add a setting to the [IMAGE] token in the template.xml file named "DOWNLOAD" and set it's value to "true" (note: setting and value are case-sensitive), it will use the "Width" setting of the [THUMBNAIL] token to resize the image and trigger the download function when clicked.

So replace the [THUMBNAIL] token with [IMAGE], then in the template.xml file, add settings to the [IMAGE] token settings to set the "DOWNLOAD" setting to "true", and make sure the "Width" setting is set on the [THUMBNAIL] token.


 
New Post
7/2/2012 10:31 AM
 
When I display the repository, the thumbnail image display shows some html instead of the image. I wish we could post images here. This behavior occurs with versions 3.5.4 and 3.5.6You can see the site at: http://hur6.rmsanswers.comThe repository is used via the menu item, "Der Wirbelsturm" under the "News" menu. We really need a code block function for this.
Thanks for the reply.I have modified template.xml as follows: I have modified template.html (nifty template) as follows:
Thumbnail
 
New Post
7/2/2012 10:36 AM
 

Hi Steve.Please let me know what the proper way to include XML and HTML snippets is. My reply is a mess.

You can view the module with the changes to the template html and template.xml files at:

http://hur6.rmsanswers.com

The repository is used by the Der Wirbelsturm menu item under the NEWS menu.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryConfigure thumbnail image to initiate downloadConfigure thumbnail image to initiate download


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out